package com.ahp.log;

import java.io.IOException;
import java.util.logging.FileHandler;
import java.util.logging.Level;
import java.util.logging.Logger;

public class AhpLogFactory {
	public static Logger getLogger(Level level) {
		Logger logger = Logger.getLogger("AhpLogger");
		try {
			logger.addHandler(new FileHandler("AhpLogs.log",true));
			logger.setLevel(level);
		} catch (SecurityException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return logger;
	}
}
